#ifndef motor_h
#define motor_h

// Motor parameters
#define GR					(50.0)		// gear ratio
#define ENC_RAD_PER_CNT    	(0.012566) 	// rad/count
#define AMP_GAIN			(.00625)   	// V/mA

#define MAX_CURRENT_MA		(1600)		// mA, peak current of motor
#define TORQUE_CONSTANT		(1.11)		// Nm/A
#define INERTIA				(0.0091)	// Nm^2

#define KM_POS				(0.460)		// Nm/A for positive torques
#define DYN_FRIC_POS		(0.00550)	// dynamic friction
#define STAT_FRIC_POS		(0.0484)	// static friction

#define KM_NEG				(0.437)		// Nm/A for negative torques
#define DYN_FRIC_NEG		(0.00610)	// dynamic friction
#define STAT_FRIC_NEG		(0.0466)	// static friction

double calcI(double vel, double accel);
double sign(double vel);

#endif // motor_h

